package io.renren.modules.app.controller.wechat;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.renren.common.constans.GoodTypeCodeConstans;
import io.renren.common.utils.R;
import io.renren.modules.sys.entity.SysCodeEntity;
import io.renren.modules.sys.service.SysCodeService;

/**
 * 商品分类
 * @author chaolemen
 *
 */
@RestController
@RequestMapping("/wechat/cat")
public class WechatGoodCat {
	
	@Autowired
	private SysCodeService sysCodeService;
	
	/*
	 * 淘宝商品分类 taobao_good_cat
	 * @param params
	 * @return
	 */
	@RequestMapping("/goodcats")
	public R listgoodcat(){
		List<SysCodeEntity> goodcats = sysCodeService.queryListByTypeCode(GoodTypeCodeConstans.CAT_TAOBAO_GOOD);
		return R.ok().put("goodcats", goodcats);
	}

}
